Create Customer
This API is used to create a single customer in the platform.
| HTTP URL | |
|---|---|
| POST | /api/v2/customer/{id} |
Eligibility
The Requester is eligible to request to create its own sub-customers only. The Requester is not allowed to create a customer for any other level in the hierarchy.
API Request
Request Structure
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| status | String | M | Initial LCP status: ENUM: ACTIVE, SUSPEND |
| type | String | O | Customer type. ENUM: PRIVATE, BUSINESSDefault = PRIVATE |
| name | String | O | Business or private name |
| currency | String | M | Customer’s global monetary currency. For example, USD, GBP, EUR |
| allowOffer Delegation |
Boolean | O | Defines whether the Parent permits its customer to attach parent packages or parent plans to customer subscribers.
|
| isAllowedImei Lock |
Boolean | O |
Defines whether the created customer can decide if to enable SIM to device locking.
|
| vatRegistration Number |
String | O | Tax registration number |
| logo | String | O | Path to customer logo (company logo) (future feature) |
| mfaConfiguration | String | O | Defines Multi-Function Authentication (MFA) configuration. ENUM valid values: MANDATORY, ENABLED, DISABLED
|
| contact | Object | O | Customer contact details object. |
| address | Object | O | Array of customer address details object. |
| invoice Configuration |
Object | O | Invoice configuration details object. If not provided, the system will apply the default configuration values. |
| customFields | Object | O | Placeholder array used for customization purposes (future feature). |
Contact data objects
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| emailAddress | String | O | Contact email address; validated via Regular Expression |
| type | String | O |
Contact type, whether owner of the customer or a member.
|
| role | String | M |
Eligible to enter the self-care application.
|
| salutation | String | O | Contact salutation: ENUM: MR, MS |
| firstName | String | O | Contact first name |
| middleName | String | O | Contact middle name |
| lastName | String | O | Contact last name |
| identity | Object | M | Array of contact identity numbers. |
| gender | String | O | Contact gender: ENUM: MALE, FEMALE |
| birthdate | Date | O | Contact date of birth. Format: DDMMYYYY |
| landlinePhone Number |
String | CM | CBR, can be reached phone number. Mandatory if mobilePhoneNumber is not provided |
| mobilePhoneNumber | String | CM | CBR, can be reached phone number. Mandatory if landlinePhoneNumber is not provided. Format is International E.164 |
| additionalPhone Number |
String | O | Additional phone number where the contact can be reached |
| picture | String | O | Contact photograph (future feature) |
| remarks | String | O | General remarks |
| isPrimary | Boolean | O |
Determines whether the contact is primary or not.
|
Identity data objects
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| idType | String | M |
Identity type: ENUM: ID, PASSPORT, DRIVER_LICENSE |
| idNumber | String | M | ID number |
Address data objects
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| type | String | O | Address type. ENUM: PRIVATE, SHIPPING, MAILING. Default is PRIVATE |
| street | String | CM | Street name. Mandatory if pobox (postal office box) is not provided |
| buildingNumber | String | CM | Building number on the street. Mandatory if pobox is not provided |
| buildingName | String | O | Building name (alias) if it exists |
| buildingFloor | String | O | Floor number in the building |
| zipCode | String | M | Zip postal code |
| apartmentNumber | String | O | Apartment number in the building |
| entrance | String | O | Entrance identifier. Can be a letter or number |
| city | String | M | City name |
| province | String | O | Province name |
| state | String | O | State name |
| country | String | M | Country name |
| pobox | String | CM | Postal Office Box number. Mandatory if street and streetNumber are not provided |
| salutation | String | O | Address representative salutation. ENUM: MR, MS |
| fullName | String | M | Representative full name |
| title | String | O | Address representative title. ENUM: DR, PROF |
| company | String | O | Company name |
| emailAddress | String | O | Email address. Validated via Regular Expression |
| isPrimary | Boolean | O |
Determines whether the contact is primary or not.
|
Invoice Configuration data objects
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| deviceCost | Decimal | O |
Cost of the chosen active device. Note: No longer in use. Device cost is derived either from the plan’s cost or based on the network activity following the account settings. |
| deliveryMethod | String | O | The requested invoice delivery method. ENUM valid values: EMAIL, POSTAL, EDI |
| paymentDueAfterInvoiceIssued | Numeric | O | The invoice payment due after some period. The count starts once the invoice is issued. |
| paymentDueUnits | String | CM | Selected time interval to use in Payment Due After Invoice Issued. ENUM valid values: DAYS. Mandatory if paymentDueAfterInvoiceIssued is provided. |
| vat | Decimal | O |
Fixed tax percentage.
|
| invoiceText | String | O | Free text shown in the invoice. Maximum size: 60 bytes |
Custom fields data objects
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| keyName | String | O | Name of the custom element |
| keyValue | String | O | Custom element value |
API Response
Response Structure
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| errorCode | String | O | Failure code. |
| errorMessage | String | O | Failure message. |
| content | Object | O | Array of main response body object displayed when an API call was successful. For a failure, it will be empty. |
| pageable | Object | O | Paging information object displayed when an API call was successful. For a failure, it will be empty. |
Content data objects
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| requestId | UUID | M |
Request instance ID. To be used by external systems to query the call (operation) status:
|
| id | UUID | M | New customer universal unique identity |
| customerid | UUID | M | New customer universal unique identity |
Pageable data objects
| Element | Type | M/O/CM | Description |
|---|---|---|---|
| page | Numeric | M | Page number |
| size | Numeric | M | Page size. Number of requested elements per page |
| totalPages | Numeric | M | Total amount of available pages per requested page size |
| totalElements | Numeric | M | Total amount of retrieved elements |
Error Codes
In addition to the general success and failure codes, the following error codes are possible.
| Code | Message |
|---|---|
| GLOBAL_1001 | Service unavailable. Please try again |
Examples
Request Body
{ "status": "ACTIVE",
"type": "private",
"name": "Liberty",
"currency": "USD",
"allowOfferDelegation": false,
"isAllowedImeiLock": true,
"vatRegistrationNumber": "sa102786534",
"logo": "/images/flolive/flologo.png",
"mfaConfiguration": "DISABLED",
"contact": {"contact": {
"emailAddress": "shaul.cohen@flolive.net",
"type": "OWNER",
"role": "NONE",
"salutation": "MR",
"firstName": "Shaul",
"middleName": "",
"lastName": "Cohen",
"identity": [
{
"idType": "passport",
"idNumber": "123456789"
},
{
"idType": "nationalId",
"idNumber": "987654321"
}
],
"gender": "MALE",
"birthdate": "28122000",
"landlinePhoneNumber": "",
"mobilePhoneNumber": "972542265160",
"additionalPhoneNumber": "",
"picture": "",
"remarks": "",
"isPrimary": true
},
"address": [
{
"type": "private",
"street": "sixth avenue",
"buildingNumber": "987",
"buildingName": "Concord",
"buildingFloor": "1",
"zipCode": "123456",
"apartmentNumber": "14",
"entrance": "1",
"city": "Chicago",
"province": "",
"state": "Illinois",
"country": "USA",
"pobox": "",
"salutation": "MR",
"fullName": "Jack Coban",
"title": "DR",
"company": "Company",
"emailAddress": "jackcoban@company.com",
"isPrimary": true
},
{
"type": "mailing",
"street": "fifth avenue",
"buildingNumber": "234",
"buildingName": "Concord",
"buildingFloor": "12",
"zipCode": "123456",
"apartmentNumber": "14",
"city": "New York",
"province": "",
"state": "New York",
"country": "USA",
"pobox": "",
"salutation": "MR",
"fullName": "John Levis",
"title": "PROF",
"company": "Company",
"emailAddress": "johnlevis@company.com",
"isPrimary": false
}
],
"invoiceConfiguration": {
"deviceCost": "",
"deliveryMethod": "EMAIL",
"paymentDueAfterInvoiceIssued": 15,
"paymentDueUnits": "DAYS",
"vat": 8.5,
"invoiceText": "free text"
},
"customFields": [
{
"keyName": "custom-property1",
"keyValue": "custom-value"
},
{
"keyName": "custom-property2",
"keyValue": "custom-value"
}
]
}
Response Body: Success ACK
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"requestId": "ff74dca6-8e7f-4b85-a42b-13860913b370",
"id": "e7fcef24-5c03-41dd-9e33-995b7d6f46b6",
"customerid": "e7fcef24-5c03-41dd-9e33-995b7d6f46b6"
}
],
"pageable": {
"page": 0,
"size": 10,
"totalPages": 1,
"totalElements": 1
}
}
Response Body: Failure NAK
{
"errorCode": "GLOBAL_1001",
"errorMessage": "Service unavailable. Please try again",
"content": "",
"pageable": ""
}